﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Transfer.Domain.Migrations
{
    public partial class Trans01 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreateName",
                table: "SheepRescission");

            migrationBuilder.DropColumn(
                name: "UpdName",
                table: "SheepRescission");

            migrationBuilder.RenameColumn(
                name: "UpdDate",
                table: "SheepRescission",
                newName: "UpdateDate");

            migrationBuilder.RenameColumn(
                name: "ElectronicEarLabel",
                table: "SheepRescission",
                newName: "EITag");

            migrationBuilder.AlterColumn<DateTime>(
                name: "SurrenderDate",
                table: "SheepRescission",
                type: "datetime2",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "datetime2");

            migrationBuilder.AddColumn<string>(
                name: "CreateBy",
                table: "SheepRescission",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDel",
                table: "SheepRescission",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "UpdateBy",
                table: "SheepRescission",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreateBy",
                table: "SheepRescission");

            migrationBuilder.DropColumn(
                name: "IsDel",
                table: "SheepRescission");

            migrationBuilder.DropColumn(
                name: "UpdateBy",
                table: "SheepRescission");

            migrationBuilder.RenameColumn(
                name: "UpdateDate",
                table: "SheepRescission",
                newName: "UpdDate");

            migrationBuilder.RenameColumn(
                name: "EITag",
                table: "SheepRescission",
                newName: "ElectronicEarLabel");

            migrationBuilder.AlterColumn<DateTime>(
                name: "SurrenderDate",
                table: "SheepRescission",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                oldClrType: typeof(DateTime),
                oldType: "datetime2",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateName",
                table: "SheepRescission",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UpdName",
                table: "SheepRescission",
                type: "nvarchar(max)",
                nullable: true);
        }
    }
}
